$(function(){
	//下拉菜单
	function tab (obj1,obj2){
			$(obj1).hover(function(){
				$(obj2).stop().slideDown()
				},function(){
					$(obj2).stop().slideUp()
			})
	}
	tab("#t_head a","#t_cont")
	tab("#t_head1 a","#t_cont1")
	tab("#t_head2 a","#t_cont2")
	tab("#t_head3 a","#t_cont3")
	
	//全选  反选   全不选
	$("#qs").click(function(){
		if($(this).prop("checked")){
			$("#check input").prop("checked",true)
		}else{
			return false
		}
	})
	$("#qbs").click(function(){
		$("#check input").prop("checked",false)
	})
	$("#fx").click(function(){
		if($(this).prop("checked")){
			$("#check input").prop("checked",true)
		}else{
			$("#check input").prop("checked",false)
		}
	})
	function tab1 (obj1,obj2,obj3,obj4,obj5) {
		$(obj1).mouseover(function(){
			$(obj1).removeClass(obj3);
			$(obj2).removeClass(obj4);
			$(this).addClass(obj3);	
			$(obj2).eq($(this).index()).addClass(obj4);
		})	
	}
	function tab2 (obj1,obj2,obj3,obj4,obj5) {
		$(obj1).mouseover(function(){
			$(obj1).removeClass(obj3);
			$(obj2).removeClass(obj4);
			$(this).addClass(obj3);	
			$(obj2).eq($(this).parents(obj5).index()).addClass(obj4);
		})	
	}
	tab2('#tab_h div','#tab_c ul',"active","show","li")
	tab1('#tab_h1 li','#tab_c1 dl',"active","videoList_newList")
	tab1('#tab_h2 li','#tab_c2 ul',"active","hide","ul")
	tab1('#tab_h3 a','#tab_c3 div',"active","show")
	tab1('#tab_h4 li','#tab_c4 dl',"active","videoList_sm")
	tab1('#tab_h5 li','#tab_c5 dl',"active","videoList_sm")
	tab1('#tab_h6 li','#tab_c6 div',"active","show")
	tab1('#tab_h7 li','#tab_c7 dl',"active","videoList_sm")
	tab1('#tab_h8 li','#tab_c8 div',"active","show")
	tab1('#tab_h9 li','#tab_c9 dl',"active","videoList_sm")
	tab1('#tab_h10 li','#tab_c10 dl',"active","videoList_sm")
	tab1('#tab_h11 li','#tab_c11 dl',"active","videoList_sm")
	tab1('#tab_h12 span','#tab_c12 dl',"active","videoList_sm")
	tab1('#tab_h13 span','#tab_c13 dl',"active","videoList_sm")
	
})
